package com.bawei.fuxi.base.interceptor;


import com.blankj.utilcode.util.SPUtils;

import java.io.IOException;

import okhttp3.Interceptor;
import okhttp3.Request;
import okhttp3.Response;

public class TokenInterceptor implements Interceptor {
    @Override
    public Response intercept(Chain chain) throws IOException {
        String token = SPUtils.getInstance().getString("token");
        Request request = chain.request().newBuilder().addHeader("token", token).build();
        return chain.proceed(request);
    }
}
